package com.networkmmc.demo.sql;

/**
 * 用于处理SQL的常量类
 */
public class Contants {
    public final static String SELECT = "SELECT ";
    public final static String INSERT = "INSERT INTO ";
    public final static String VALUES = " VALUES ";
    public final static String UPDATE = "UPDATE ";
    public final static String SET = " SET ";
    public final static String DELETE = "DELETE ";
    public final static String FROM = " FROM ";
    public final static String WHERE = " WHERE ";
    public final static String AND = " AND ";
    public final static String ALL = " * ";
    public final static String SEPARATORS = " , ";
    public final static String PLACEHOLDER = " ? ";
    public final static String EQUALS = " = ";
    public final static String DEFAULT_CONDITION = " 1=1 ";
    public final static String LEFT_BRACKET = " ( ";
    public final static String RIGHT_BRACKET = " ) ";
    public final static String KEY_ = "UUID_";
    public final static String PAGE = "page";
    public final static String PAGE_SIZE = "pageSize";

    public final static String COL_CREATED_BY = "CREATED_BY";
    public final static String COL_CREATED_TIME = "CREATED_TIME";
    public final static String COL_UPDATED_BY = "UPDATED_BY";
    public final static String COL_UPDATED_TIME = "UPDATED_TIME";

    //查询字段类型
    public final static String COL_STRING = "String";
    public final static String COL_NUMBER = "Number";
    public final static String COL_DATE = "Date";

    //匹配类型字典
    public final static String MATCH_CONTAIN = "CONTAIN";
    public final static String MATCH_EQUAL = "EQUAL";
    public final static String MATCH_LESS = "LESS";
    public final static String MATCH_LESS_EQUAL = "LESS_EQUAL";
    public final static String MATCH_GREATER = "GREATER";
    public final static String MATCH_GREATER_EQUAL = "GREATER_EQUAL";

    //SQL语句中的匹配方式
    public final static String CONTAIN  = " like ";
    public final static String EQUAL = " = ";
    public final static String LESS = " < ";
    public final static String LESS_EQUAL = " <= ";
    public final static String GREATER = " > ";
    public final static String GREATER_EQUAL = " >= ";

    //日期匹配方式
    public final static String SQL_MATCH_DT_TYPE_SEDT = "SEDT";
    public final static String SQL_MATCH_DT_TYPE_YEAR = "YEAR";
    public final static String SQL_MATCH_DT_TYPE_MONTH = "MONTH";
    public final static String SQL_MATCH_DT_TYPE_DAY = "DAY";

}
